package com.example.controller.courseController;

import com.example.pojo.shangPinTree.Node;
import com.example.service.courseService.JsCourseClassService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

/**
 * @Author:郭
 * @Description: TODO
 * @Date: 2022/11/24 14:01
 * @ClassName JsCourseClassController
 * 课程分类表
 */
@RequestMapping("/course")
@Controller
public class JsCourseClassController {
    @Autowired
    private JsCourseClassService jsCourseClassService;
    /**
     * @Author: 郭
     * @Date: 2022/11/24 14:48
     * @Param:
     * @Return:
     * 全查课程分类表中的全部数据，实现tree
     */
    @GetMapping("/getAll")
    @ResponseBody
    public List<Node> getAll(){
        List<Node> all = jsCourseClassService.getAll();
        return all;
    }

}
